package com.xpc.mapper;

import com.xpc.pojo.qin.RClassSimpleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Qinkuer
 * @version 1.0.0
 * @ProjectName UniversityGradeAdministrationSystem
 * @ClassName RClassSimpleInfoMapper.java
 * @Description TODO 以后考虑优化时,可以补充
 * @createTime 2022年05月23日 15:38:00
 */
@Mapper
public interface RClassSimpleInfoMapper {
    /**
        * @description 获取班级,班干简单信息
        * @return  java.util.List<com.xpc.pojo.qin.RClassSimpleInfo>
        * @author Qinkuer
        * @Date  2022/5/26
        */
//    @Select("select c.id as classId,c.name as className,c.major as majorName,c.studentNums,mcc.user_id as userId,mcc.positionName as committeeName,mcc.name as name from\n" +
//            "\t(select c.*,m.name as major from \n" +
//            "\t\t(select c.*,count(s.user_id) as studentNums from class c left join student s on c.id =s.class_id group by c.id ) as c  \n" +
//            "\tjoin major m where c.major_id=m.id ) as c \n" +
//            "left join\n" +
//            "\t(select mcc.*,u.name from \n" +
//            "\t\t(select mcc.class_id,mcc.user_id,p.name as positionName from member_committee_class mcc join `position` p where mcc.position_id = p.id ) mcc \n" +
//            "\tleft join \n" +
//            "\t`user` u on mcc.user_id =u.user_id ) as mcc \n" +
//            "on c.id=mcc.class_id")
    List<RClassSimpleInfo> getAllClassSimpleInfo();

}
